﻿<Page x:Class="Majesty_of_Omega.GUI.Pages.Game.SitReport.SitReportPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="SitReportPage" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="896.5" d:DesignHeight="573.5" 
      xmlns:Controller="clr-namespace:Majesty_of_Omega.GUI.Controller" xmlns:Majesty_of_Omega_GUI_ValueConverters="clr-namespace:Majesty_of_Omega.GUI.ValueConverters">
    <Page.Resources>
        <Majesty_of_Omega_GUI_ValueConverters:SeverityToImageConverter x:Key="SeverityToImageConverter"/>
        <Majesty_of_Omega_GUI_ValueConverters:UriToImageConverter x:Key="UriToImageConverter"/>
        <ObjectDataProvider x:Key="SitReportControllerDS" ObjectType="{x:Type Controller:SitReportController}" d:IsDataSource="True"/>
        <Style x:Key="TurnTextStyle" TargetType="{x:Type TextBlock}">
            <Setter Property="TextWrapping" Value="NoWrap"/>
            <Setter Property="TextTrimming" Value="None"/>
            <Setter Property="FontWeight" Value="Bold"/>
            <Setter Property="Foreground" Value="#FFFFFFFF"/>
            <Setter Property="FontSize" Value="24"/>
        </Style>
        <DataTemplate x:Key="SitReportEntryDataTemplate">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="0.777*"/>
                    <RowDefinition Height="0.223*"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="64"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="85.5"/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding Path=Description, Mode=Default}" TextWrapping="Wrap" Margin="4,4,4,4" Grid.RowSpan="1" Grid.ColumnSpan="1" Grid.Column="1"/>
                <Image Grid.Column="2" x:Name="SitRepIcon" Source="{Binding Path=Icon, Converter={StaticResource UriToImageConverter}, ConverterParameter=/Graphics/Tech/, Mode=Default}" Grid.RowSpan="2" Margin="4,4,4,4" StretchDirection="Both" Width="Auto"/>
                <Path Stretch="Fill" Margin="0,0,0,0" VerticalAlignment="Bottom" Height="9.333" Grid.ColumnSpan="3" Data="M93,1L457,1" StrokeThickness="4" Grid.Row="1">
                    <Path.Stroke>
                        <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5" >
                            <GradientStop Color="#FF000E37" Offset="0"/>
                            <GradientStop Color="#FF001451" Offset="1"/>
                            <GradientStop Color="#FF50576C" Offset="0.513"/>
                        </LinearGradientBrush>
                    </Path.Stroke>
                </Path>
                <TextBlock TextWrapping="Wrap" Grid.Row="1" FontStyle="Italic" Foreground="#FF849BEC" Grid.Column="1" Width="Auto" HorizontalAlignment="Left" Margin="4,0,0,0" VerticalAlignment="Center">
                    <Hyperlink Tag="{Binding}" >
                        <InlineUIContainer>
							<TextBlock Text="We need your commands"/>
                        </InlineUIContainer>
                    </Hyperlink>
                </TextBlock>
                <Image Grid.ColumnSpan="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Source="{Binding Path=ReportPriority, Converter={StaticResource SeverityToImageConverter}, Mode=Default}" Margin="8,20,8,20" Stretch="Uniform" x:Name="SeverityImage" Grid.RowSpan="2"/>
            </Grid>
        </DataTemplate>
        <DataTemplate x:Key="TurnDataTemplate">
            <Border Width="Auto" Height="Auto" BorderThickness="2,2,2,2" CornerRadius="4,4,4,4" Margin="0,4,0,4" BorderBrush="#FFFFFFFF" Padding="4,4,4,4">
                <Grid Width="Auto" Height="Auto">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="119.394"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel HorizontalAlignment="Left" VerticalAlignment="Top" Width="Auto" Height="Auto" Orientation="Horizontal">
                        <TextBlock Text="Turn" Style="{DynamicResource TurnTextStyle}"/>
                        <TextBlock Text="{Binding Path=TurnNumber}" Style="{DynamicResource TurnTextStyle}" Margin="10,0,0,0"/>
                    </StackPanel>
                    <ItemsControl VerticalAlignment="Bottom" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,0" Grid.Row="0" x:Name="SitRepItemsControl" ItemsSource="{Binding Path=SitReportEntries, Mode=Default}" Foreground="#FFFFFFFF" ItemTemplate="{DynamicResource SitReportEntryDataTemplate}"/>
                </Grid>
            </Border>
        </DataTemplate>
    </Page.Resources>
    <Grid x:Name="LayoutRoot" DataContext="{Binding Mode=OneWay, Source={StaticResource SitReportControllerDS}}" >
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="0.284*"/>
            <ColumnDefinition Width="0.716*"/>
        </Grid.ColumnDefinitions>
        <Rectangle Width="Auto" Height="Auto" Opacity="0.895" Grid.ColumnSpan="1" Grid.Column="1" >
            <Rectangle.Fill>
                <LinearGradientBrush StartPoint="0, 0.5" EndPoint="1, 0.5" >
                    <GradientStop Color="#FF000000" Offset="0"/>
                    <GradientStop Color="{DynamicResource TitleDeepBlueColor}" Offset="1"/>
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <ListView x:Name="TurnsListView" ItemsSource="{Binding Path=Turns}" ItemTemplate="{DynamicResource TurnDataTemplate}" Background="{x:Null}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Grid.ColumnSpan="1" Grid.Column="1"/>
        <Rectangle Stroke="#FF000000" Fill="#FF000000" Opacity="0.495" x:Name="LeftDarkRectangle"/>
        <TextBlock Text="Situation Report"  Style="{DynamicResource SubWindowTitleStyle}" HorizontalAlignment="Stretch" Margin="37.872,8,30.477,0" d:LayoutOverrides="Width" Height="97.223" TextWrapping="Wrap" />
    </Grid>
</Page>
